<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Hairy Business</title>
        <link type="text/css" rel="stylesheet" href="main.css"/>
        <?php
        if(isset($_GET['senden'])){
            
            $vorname=$_GET['vorname'];
            $name=$_GET['name'];
            $strasse=$_GET['strasse'];
            $strassennummer=$_GET['strassennummer'];
            $plz=$_GET['plz'];
            $ort=$_GET['ort'];
            $telefonnummer=$_GET['telefonnummer'];
            $bemerkung=$_GET['bemerkung'];
            
            include('dbconnection.php');

            $sql = "INSERT INTO `hairybusiness`.`kunde` (`ID`,`Vorname`,`Name`,`Strasse`,
                `Strassennummer`,`PLZ`,`Wohnort`,`Telefonnummer`,`Bemerkungen`)VALUES
                ('','$vorname','$name','$strasse','$strassennummer','$plz','$ort','$telefonnummer','$bemerkung');";
            mysql_query($sql);
            mysql_close();
        }
        ?>
    </head>
    <body>
        <div id="body">
            <!--//Include the header part with the logo and the menu-->
            <?php include("header.php"); ?>
            <div id="content">
                <p>Bitte Formular ausfüllen</p>
                <form action="<?php $_SERVER['PHP_SELF']; ?>" method="get">
                    <input type="text" name="vorname" value="" />Vorname<br/>
                    <input type="text" name="name" value="" />Name<br/>
                    <input type="text" name="strasse" value="" />Strasse<br/>
                    <input type="text" name="strassennummer" value="" />Strassennummer<br/>
                    <input type="text" name="plz" value="" />PLZ<br/>
                    <input type="text" name="ort" value="" />Wohnort<br/>
                    <input type="text" name="telefonnummer" value="" />Telefonnummer<br/>
                    <input type="text" name="bemerkung" value="" />Bemerkungen<br/>
                    <input type="submit" name="senden" value="senden" />
                    <input type="reset" value="abbrechen" />
                </form>
            </div>
            <!--//Include the footer part-->
            <?php include("footer.php"); ?>
        </div>
    </body>
</html>